package com.mo.tv.modelEnum;

import com.mo.dto.EnumDataType;

public enum LabelStatusEnum implements EnumDataType{
	NORMAL(0,"正常"),
	OFFLINE(1,"禁用");
	private Integer code;
    private String status;
	public Integer getCode() {
		return code;
	}
	public void setCode(Integer code) {
		this.code = code;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
    
	private LabelStatusEnum(Integer code, String status) {
		this.code = code;
		this.status = status;
	}
	
	public static LabelStatusEnum getEnum(Integer code) {
        for (LabelStatusEnum levelEnum : values()) {
            if (levelEnum.getCode().equals(code)) {
                return levelEnum;
            }
        }
        return NORMAL;
    }
	@Override
	public String getDisplay() {
		// TODO Auto-generated method stub
		return this.status;
	}
	@Override
	public String getValue() {
		// TODO Auto-generated method stub
		return this.code.toString();
	}
}
